{if $GLOBALS['TS_SITE'][isgzip]==1}{php ob_start('ob_gzip');}{/if}
<!DOCTYPE HTML>
<!--[if lt IE 7]>      <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]-->
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="content-language" content="zh-CN" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="applicable-device" content="pc,mobile">
    <meta name="robots" content="all" />
    <meta name="save" content="history" />
    <meta name="author" content="{$GLOBALS['TS_CF'][info][email]}" />
    <meta name="Copyright" content="{$GLOBALS['TS_CF'][info][name]}" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <!--
    <title>{if $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_SITE']['site_title']} - {$title}{elseif $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']!='index'}{$title} - {$GLOBALS['TS_SITE'][site_title]}{elseif  $GLOBALS['TS_URL']['app']!='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE'][site_title]}{else}{$title}_{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE'][site_title]}{/if}
    </title>

    <title>{if $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_SITE']['site_title']} - {$title}{elseif $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']!='index'}{$title}{elseif  $GLOBALS['TS_URL']['app']!='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE'][site_title]}{else}{$title}{/if}
    </title> -->
    <title>{if $title}{$title}{else}{$GLOBALS['TS_APP']['appname']}{/if}_{$GLOBALS['TS_SITE'][site_title]}</title>
    {if  $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}
    <meta name="keywords" content="{$GLOBALS['TS_SITE'][site_key]}" />
    <meta name="description" content="{$GLOBALS['TS_SITE'][site_desc]}" />
    {else}
    {if $sitekey}<meta name="keywords" content="{$sitekey}" /> {/if}
    {if $sitedesc}<meta name="description" content="{$sitedesc}" /> {/if}
    {/if}
    <link rel="shortcut icon" href="{SITE_URL}favicon.ico" />

    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="{SITE_URL}public/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="{SITE_URL}public/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="{SITE_URL}public/swiper/swiper.css">
    <link rel="stylesheet" href="{SITE_URL}public/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="{SITE_URL}theme/sample/base.css" />

    {if is_file('app/'.$GLOBALS['TS_URL']['app'].'/skin/style.css')}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}app/{$GLOBALS['TS_URL']['app']}/skin/style.css">
    {else}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}app/{$GLOBALS['TS_URL']['app']}/skins/default/style.css">
    {/if}

    <link rel="stylesheet" type="text/css" href="{SITE_URL}app/history/skin/timeline.css">
    <!--新风格加载-->
    {if is_file('theme/'.$GLOBALS['tstheme'].'/style.css')}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}theme/{$GLOBALS['tstheme']}/style.css" id="tsTheme" />
    {/if}



    <!--[if lt IE 8]>
    <link href="{SITE_URL}public/js/oldie.css" rel="stylesheet">
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="{SITE_URL}public/js/html5shiv.js"></script>
    <![endif]-->

    <!--[if IE 8]>
    <script src="{SITE_URL}public/js/respond.min.js"></script>
    <![endif]-->

    <script src="{SITE_URL}public/swiper/swiper.js"></script>
    <script>var siteUrl = '{SITE_URL}'; //网站网址</script>
    <script src="{SITE_URL}public/js/jquery.min.js" type="text/javascript"></script>
    <script src="{SITE_URL}public/js/mobileBUGFix.mini.js" type="text/javascript"></script>
    <script src="{SITE_URL}public/js/dateselect.js" type="text/javascript"></script>

    <!--jquery向下兼容-->
    <script src="{SITE_URL}public/js/jquery-migrate.js" type="text/javascript"></script>

    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="{SITE_URL}public/bootstrap/js/bootstrap.min.js"></script>

    <!--bootstrap 前端验证-->
    <script type="text/javascript" src="{SITE_URL}public/js/bootstrap3-validation.js"></script>

    <!--bootbox-->
    <script src="{SITE_URL}public/js/bootbox.js" type="text/javascript"></script>


    {if $GLOBALS['TS_CF']['urllock']}
    <script type="text/javascript">
        var urllock="$GLOBALS['TS_CF']['urllock']";if(document.domain!=urllock){top.location.href=siteUrl;}
    </script>
    {/if}

  <!--微信抓取缩略图-->
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script>
        /*
         * 注意：
         * 1. 所有的JS接口只能在公众号绑定的域名下调用，公众号开发者需要先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。
         * 2. 如果发现在 Android 不能分享自定义内容，请到官网下载最新的包覆盖安装，Android 自定义分享接口需升级至 6.0.2.58 版本及以上。
         * 3. 常见问题及完整 JS-SDK 文档地址：http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
         *
         * 开发中遇到问题详见文档“附录5-常见错误及解决办法”解决，如仍未能解决可通过以下渠道反馈：
         * 邮箱地址：weixin-open@qq.com
         * 邮件主题：【微信JS-SDK反馈】具体问题
         * 邮件内容说明：用简明的语言描述问题所在，并交代清楚遇到该问题的场景，可附上截屏图片，微信团队会尽快处理你的反馈。
         */
        wx.config({
            debug: false,
            appId: '{php echo $signPackage["appId"]}',
            timestamp: '{php echo $signPackage["timestamp"]}',
        nonceStr: '{php echo $signPackage["nonceStr"]}',
                signature: '{php echo $signPackage["signature"]}',
                jsApiList: [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'onMenuShareQZone'
            // 所有要调用的 API 都要加到这个列表中
        ]
        });

        wx.ready(function () {
            wxOnShare();
        });

        function wxOnShare() {
            //var title = "{if $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_SITE']['site_title']} - {$title}{elseif $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']!='index'}{$title}{elseif  $GLOBALS['TS_URL']['app']!='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE'][site_title]}{else}{$title}{/if}";
            var title = "{$title}-{$GLOBALS['TS_SITE']['site_title']}";
            var desc = "用微小的行动带来改变，用行动带来微小的改变";
            var link = location.href.split('#')[0];
            var imgUrl = "{$cover}";
            wx.onMenuShareAppMessage({
                title: title,
                desc: desc,
                link: link,
                imgUrl: imgUrl,
                trigger: function (res) {
                },
                success: function (res) {
                },
                cancel: function (res) {
                },
                fail: function (res) {
                }
            });
            wx.onMenuShareTimeline({
                title: title,
                link: link,
                imgUrl: imgUrl,
                trigger: function (res) {
                },
                success: function (res) {
                },
                cancel: function (res) {
                },
                fail: function (res) {
                }
            });
        }

        function getCheckboxValue(name){
            var chkObjs = document.getElementsByName(name);
            var value='';
            for(var i=0;i<chkObjs.length;i++){
                if(chkObjs[i].checked){
                    if(i==0){
                        value=chkObjs[i].value;
                    } else {
                        value=value+','+chkObjs[i].value;
                    }
                }
            }
            return value;
        }


        function in_array(stringToSearch, arrayToSearch) {
            for (s = 0; s < arrayToSearch.length; s++) {
                thisEntry = arrayToSearch[s].toString();
                if (thisEntry == stringToSearch) {
                    return true;
                }
            }
            return false;
        }

        function Trim(str){
            str = str.replace(/<(?!img).*?>/g,"");
            str = str.replace(/^\s\s*/, '').replace(/\s\s*$/, '')
            return str;
        }

        //隐藏遮罩层
        function hideMask(){

            $("#mask").hide();
        }

    </script>

    <style>
        .bbox .nav li a{
            padding-left: 12px;
            padding-right: 12px;
        }
    </style>

    <style>
        {php doAction('pub_header_css')}
    </style>


    {if isMobile()}
    <style>
        .appnav ul{
            display: flex;
        }
        .appnav ul li{
            width: 100%;
        }
    </style>
   {/if}
    {php doAction('pub_header_top')}

    {php doAction('gobad','pub_header')}

</head>
<body>

<nav class="navbar navbar-blue header" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">


            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-user">
                <span class="sr-only">用户信息/登录等</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>


            <a class="navbar-brand" href="{SITE_URL}"><img title="{$GLOBALS['TS_SITE'][site_title]}" src="{SITE_URL}uploadfile/logo/{$GLOBALS['TS_SITE'][logo]}" alt="{$GLOBALS['TS_SITE'][site_title]}" width="120" height="40" /></a>
        </div>


        <ul class="nav navbar-nav hidden-xs">
            <li class="active"><a href="{SITE_URL}">微澜社区</a></li>
            <li ><a href="http://www.xingongmin.org.cn">机构网站</a></li>
            <!--
            {php doAction('pub_header_nav')}-->
        </ul>


        <ul class="nav navbar-nav navbar-right navbar-collapse collapse" id="header-user">
            <form id="searchto" class="navbar-form navbar-left" role="search" method="get" action="{SITE_URL}index.php">
                <li class="form-group">
                    <input type="hidden" name="app" value="search" />
                    <input type="hidden" name="ac" value="s" />
                    <input type="text" class="form-control js-search" name="kw" placeholder="搜索" />
                    <button class="button glyphicon glyphicon-search" onclick="searchon()"></button>
                </li>
            </form>
            {if $GLOBALS['TS_USER']==''}
            <li><a href="{tsUrl('user','login')}">登录</a></li>
            {else}




            <li><a href="{tsUrl('user','duty',array('id'=> $_SESSION['tsuser']['userid']))}">我的空间</a></li>

            <li><a href="{tsUrl('message','my')}"><span class="badge" id="newmsg">0</span>消息</a></li>

            <li class="dropdown" style="width:200px;text-align:right;">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <img class="img-circle" src="{if $GLOBALS['TS_USER']['face']==""}{SITE_URL}public/images/user_normal.jpg{else}{php echo tsXimg($GLOBALS['TS_USER']['face'],'user','120','120',$GLOBALS['TS_USER'][path],'1')}{/if}" width="24" height="24" align="absmiddle" alt="{$GLOBALS['TS_USER']['username']}" />
                    {$GLOBALS['TS_USER'][username]}

                    <span class="caret"></span></a>
                <ul class="dropdown-menu" role="menu">
                    <li><a href="{tsUrl('my','setting',array('ts'=>'base'))}" >设置</a></li>
                    {if $GLOBALS['TS_SITE']['isinvite']=='1'}
                    <li>
                        <a href="{tsUrl('user','invite')}">邀请</a>
                    </li>
                    {/if}

                    {if $GLOBALS['TS_USER']['isadmin']=='1'}
                    <li>
                        <a target="_blank" href="{SITE_URL}index.php?app=system">管理</a>
                    </li>
                    {/if}
                    <li><a href="{tsUrl('user','login',array(ts=>out))}">退出</a></li>
                </ul>
            </li>
            {/if}
        </ul>
    </div><!-- /.container-fluid -->
</nav>






<div class="appnav">
    <div class="container">

        <ul>
            {if !isMobile()}
            {loop $GLOBALS['TS_SITE'][appnav] $key $item}
            {if $key=='home'}
            <li {if $GLOBALS['TS_URL']['app']==$key}class="select"{/if}><a href="{SITE_URL}">{$item}</a></li>
            {else}
            <li {if $GLOBALS['TS_URL']['app']==$key}class="select"{/if}><a href="{tsUrl($key)}">{$item}</a></li>
            {/if}
            {/loop}
            {/if}
        </ul>

    </div>
</div>

<div class="container">{php doAction('gobad','960')}</div>

